package com.common;

import java.io.Serializable;
import java.util.Arrays;

public class Msg implements Serializable {

    private static final long SerialVersionUID = 1L;


    private MsgType type;

    private String me;

    private String he;

    private byte[] bytes;

    private byte[] file;

    public MsgType getType() {
        return type;
    }

    public void setType(MsgType type) {
        this.type = type;
    }

    public String getMe() {
        return me;
    }

    public void setMe(String me) {
        this.me = me;
    }

    public String getHe() {
        return he;
    }

    public void setHe(String he) {
        this.he = he;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }

    public byte[] getFile() {
        return file;
    }

    public void setFile(byte[] file) {
        this.file = file;
    }

    @Override
    public String toString() {
        return "Msg{" +
                "type=" + type +
                ", me='" + me + '\'' +
                ", he='" + he + '\'' +
                ", bytes=" + Arrays.toString(bytes) +
                '}';
    }
}
